package com.freesky.common.dao.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.freesky.common.enums.StateEnum;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("tb_item_cat")
public class ItemCat extends Model<ItemCat> {
    public ItemCat() { }
    public ItemCat(Long id) {
        this.id = id;
    }
    @TableId
    private Long id;

    private Long parentId;

    private String name;

    private StateEnum state;

    private Integer sortOrder;

    @TableField("is_parent")
    private Boolean parent;

    private Date created;

    private Date updated;

    private String icon;

    private String remark;
    @Override
    protected Serializable pkVal() {
        return id;
    }
}
